﻿<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head>
    <title>CDUT - Products Grid Banner Slider</title>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="icon" href="assets/images/logocdut.png">
    <link href="https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,500,500i,700,700i&display=swap"
        rel="stylesheet">
    <link rel="stylesheet" href="http://cdn.bootstrapmb.com/bootstrap/3.3.7/css/bootstrap.min.css">
    <link rel="stylesheet" href="assets/css/font-awesome.min.css">
    <link rel="stylesheet" href="assets/css/owl.carousel.min.css">
    <link rel="stylesheet" href="assets/css/animate.min.css">
    <link rel="stylesheet" href="assets/css/jquery-ui.css">
    <link rel="stylesheet" href="assets/css/slick.css">
    <link rel="stylesheet" href="assets/css/chosen.min.css">
    <link rel="stylesheet" href="assets/css/pe-icon-7-stroke.css">
    <link rel="stylesheet" href="assets/css/magnific-popup.min.css">
    <link rel="stylesheet" href="assets/css/lightbox.min.css">
    <link rel="stylesheet" href="assets/js/fancybox/source/jquery.fancybox.css">
    <link rel="stylesheet" href="assets/css/jquery.scrollbar.min.css">
    <link rel="stylesheet" href="assets/css/mobile-menu.css">
    <link rel="stylesheet" href="assets/fonts/flaticon/flaticon.css">
    <link rel="stylesheet" href="assets/css/style.css">
    <link rel="stylesheet" href="assets/css/image.css">
</head>

<body class="productsgrid-page" style="background-color: #FBAB7E;
    background-image: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%);">
    <header class="header style7">
        <div class="top-bar">
            <div class="container">
                <div class="top-bar-left">
                    <div class="header-message">
                        欢迎
                    </div>
                </div>
                <div class="top-bar-right">

                    <ul class="header-user-links" th:if="${session.loginUser==null}">
                        <li>
                            <a th:href="@{/login}">登录/注册 </a>
                        </li>
                    </ul>
                    <ul class="header-user-links" th:if="${session.loginUser!=null}">

                        <li>
                            <a style="color: #01c6fb">用户: </a>
                            <a th:text="${session.loginUser.username}" style="color: yellowgreen"> </a>
                            <a style="color: #01c6fb"> 您好！</a>
                            <a th:href="@{/user/logout}" th:text="' 注销'" style="color: orangered"></a>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
        <div class="container">
            <div class="main-header">
                <div class="row">
                    <div class="col-lg-3 col-sm-4 col-md-3 col-xs-7 col-ts-12 header-element"
                        style="left: 120px;padding-bottom: 0px;bottom: 35px;">
                        <div class="logo">
                            <a href="index.html">
                                <img width="50%" src="assets/images/logocdut.png" alt="img"
                                    style="width:40%;magin-top: 5px;">
                            </a>
                        </div>
                    </div>
                    <div class="col-lg-7 col-sm-8 col-md-6 col-xs-5 col-ts-12">
                        <div class="block-search-block">
                            <form class="form-search form-search-width-category">
                                <div class="form-content">
                                    <div class="category">
                                        <!-- <select title="cate" data-placeholder="All Categories" class="chosen-select"
											tabindex="1">
											<option value="United States">物品</option>
											<option value="United Kingdom">TV & Video</option>
											<option value="Afghanistan">Tables</option>
											<option value="Aland Islands">Sofas</option>
											<option value="Albania">New Arrivals</option>
											<option value="Algeria">Storage</option>
										</select> -->
                                    </div>
                                    <div class="inner">
                                        <input type="text" class="input" name="s" value="" placeholder="搜索你感兴趣的商品"
                                            id="searchvalue">
                                    </div>
                                    <button class="btn-search" type="button" id="search">
                                        <span class="icon-search"></span>
                                    </button>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="header-nav-container">
            <div class="container">
                <div class="header-nav-wapper main-menu-wapper">
                    <div class="vertical-wapper block-nav-categori">
                        <div class="block-title">
                            <span class="icon-bar">
                                <span></span>
                                <span></span>
                                <span></span>
                            </span>
                            <span class="text">主页目录</span>
                        </div>
                        <div class="block-content verticalmenu-content">

                        </div>
                    </div>
                    <div class="header-nav">
                        <div class="container-wapper">
                            <ul class="CDUT-clone-mobile-menu CDUT-nav main-menu " id="menu-main-menu">
                                <li>
                                    <a th:href="@{/home}" class="CDUT-menu-item-title" title="Home">主页</a>
                                </li>
                                <li>
                                    <a th:href="@{/gridproducts_bannerslider}" class="CDUT-menu-item-title"
                                        title="Shop">铺子</a>
                                </li>

                                <li class="menu-item">
                                    <a th:href="@{/about}" class="CDUT-menu-item-title" title="About">关于我们</a>
                                </li>
                                <li class="menu-item">
                                    <a th:href="@{/shoppingcart}" class="CDUT-menu-item-title" title="add">发布</a>
                                </li>
                                <li class="menu-item" th:if="${session.loginUser!=null}">
                                    <a th:href="'gridproducts_bannerslider_my?uid='+${session.loginUser.uid}"
                                        class="CDUT-menu-item-title" title="add">我的</a>
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </header>
    <div class="main-content main-content-product no-sidebar" style="background-color: #FFDFBC;">
        <div class="container">
            <div class="row">
                <div class="col-lg-12">
                    <div class="breadcrumb-trail breadcrumbs">
                        <ul class="trail-items breadcrumb" style="background-color: #FFDFBC;">
                            <li class="trail-item trail-begin">
                                <a href="home.html">主页</a>
                            </li>
                            <li class="trail-item trail-end active">
                                铺子
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="content-area shop-grid-content full-width col-lg-12 col-md-12 col-sm-12 col-xs-12">
                    <div class="site-main">
                        <!--                        轮播图-->
                        <div class="banner-shop banner-slider owl-slick equal-container"
                            data-slick='{"autoplay":true, "autoplaySpeed":10000, "arrows":false, "dots":true, "infinite":true, "speed":800, "rows":1}'>
                            <div class="item-banner style1">
                                <div class="inner equal-element">
                                    <div class="banner-content style1">
                                        <h4 class="when-code">现在开始</h4>
                                        <button class="button button-now">进去看看</button>
                                    </div>
                                </div>
                            </div>
                            <div class="item-banner style2">
                                <div class="inner equal-element">
                                    <div class="banner-content style2">
                                        <span class="description"><br /></span>
                                        <span class="hot-price"><span class="price-number"></span></span>
                                        <button class="button button-view">查看全部</button>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <h6 class="custom_blog_title">
                            快捷跳转
                        </h6>
                        <div class="shop-top-control">
                            <form class="filter-choice select-form">
                                <span class="title">Sort by</span>
                                <select data-placeholder="页面跳转" th:onchange="window.location=this.value"
                                    class="chosen-select">
                                    <option th:each="good, list:${goodlist1}" th:if="(${list.index})%12 eq 0"
                                        th:text="(${list.index}/12+1)"
                                        th:value="'gridproducts_bannerslider?page='+ (${list.index}/12+1)"></option>
                                </select>
                            </form>
                            <div class="grid-view-mode">
                                <div class="inner">
                                    <a class="modes-mode mode-grid  active">
                                        <span></span>
                                        <span></span>
                                        <span></span>
                                        <span></span>
                                    </a>
                                </div>
                            </div>
                        </div>
                        <ul class="row list-products auto-clear equal-container product-grid">
                            <li class="product-item  col-lg-3 col-md-4 col-sm-6 col-xs-6 col-ts-12 style-1"
                                th:each="good :${goodlist}" th:id="${good.gid}">
                                <!--                                商品模板-->
                                <div class="product-inner equal-element">
                                    <div class="product-top">
                                        <div class="flash">
                                            <span class="onnew">
                                                <span class="text">
                                                    new
                                                </span>
                                            </span>
                                        </div>
                                        <div class="yith-wcwl-add-to-wishlist">
                                            <div class="yith-wcwl-add-button">
                                                <a>喜欢</a>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="product-thumb">
                                        <div class="thumb-inner">
                                            <a href="#">
                                                <img id="big-image" th:src="'/updatafile/'+${good.gname}+'.jpg'"
                                                    alt="img">
                                            </a>
                                        </div>
                                        <a href="#" class="button quick-wiew-button">Quick View</a>
                                    </div>
                                    <div class="product-info">
                                        <h5 class="product-name product_title">
                                            <a href="#" th:text="${good.gname}"></a>
                                        </h5>
                                        <div class="group-info">
                                            <div class="stars-rating">
                                                <!--                                                评价等级处-->
                                                <div class="star-rating">
                                                    <span class="star-5"></span>
                                                </div>
                                            </div>
                                            <div class="price">

                                                <ins th:text="'¥'+${good.money}">
                                                </ins>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="loop-form-add-to-cart">
                                        <form class="cart">
                                            <div class="single_variation_wrap">
                                                <div class="quantity">
                                                    <div class="control">
                                                        <a class="btn-number qtyminus quantity-minus" href="#">-</a>
                                                        <input type="text" data-step="1" data-min="0" value="1"
                                                            title="Qty" class="input-qty qty" size="4">
                                                        <a href="#" class="btn-number qtyplus quantity-plus">+</a>
                                                    </div>
                                                </div>
                                                <a class="single_add_to_cart_button button"
                                                    th:href="@{'productdetails-fullwidth?gid='+${good.gid}}">进去看看</a>
                                            </div>
                                        </form>
                                    </div>
                                </div>
                                <!--                                商品模板end-->
                            </li>
                        </ul>
                        <div class="pagination clearfix style2">
                            <!--                            分页按钮位置-->
                            <div class="nav-link">
                                <!--                                上一页-->
                                <a th:href="'gridproducts_bannerslider?page='+(${page}-1)" class="page-numbers"><i
                                        class="icon fa fa-angle-left" aria-hidden="true"></i></a>
                                <a th:href="'gridproducts_bannerslider?page='+(${list.index}/12+1)" class="page-numbers"
                                    th:each="good, list:${goodlist1}" th:if="(${list.index})%12 eq 0"
                                    th:text="(${list.index}/12+1)"></a>
                                <!--                                下一页-->
                                <a th:href="'gridproducts_bannerslider?page='+(${page}+1)" class="page-numbers"><i
                                        class="icon fa fa-angle-right" aria-hidden="true"></i></a>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script src="assets/js/jquery-1.12.4.min.js"></script>
    <script src="assets/js/jquery.plugin-countdown.min.js"></script>
    <script src="assets/js/jquery-countdown.min.js"></script>
    <script src="http://cdn.bootstrapmb.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <script src="assets/js/owl.carousel.min.js"></script>
    <script src="assets/js/magnific-popup.min.js"></script>
    <script src="assets/js/isotope.min.js"></script>
    <script src="assets/js/jquery.scrollbar.min.js"></script>
    <script src="assets/js/jquery-ui.min.js"></script>
    <script src="assets/js/mobile-menu.js"></script>
    <script src="assets/js/chosen.min.js"></script>
    <script src="assets/js/slick.js"></script>
    <script src="assets/js/jquery.elevateZoom.min.js"></script>
    <script src="assets/js/jquery.actual.min.js"></script>
    <script src="assets/js/fancybox/source/jquery.fancybox.js"></script>
    <script src="assets/js/lightbox.min.js"></script>
    <script src="assets/js/owl.thumbs.min.js"></script>
    <script src="assets/js/jquery.scrollbar.min.js"></script>
    <script src='http://ditu.google.cn/maps/api/js?key=AIzaSyC3nDHy1dARR-Pa_2jjPCjvsOR4bcILYsM'></script>
    <script src="assets/js/frontend-plugin.js"></script>
    <script type="text/javascript">
        var searchbtn = document.getElementById("search");
        searchbtn.onclick = function () {
            name = document.getElementById("searchvalue").value;
            if (name == "") {
                alert("请填写要搜索的商品名称");
                return;
            }
            var xhr = new XMLHttpRequest();
            var params = "name=" + name;
            xhr.open("GET", "/good/querygoodbyname2?" + params, true);
            xhr.send();
            xhr.onload = function () {
                document.write(xhr.responseText);
            }
        }
    </script>
</body>

</html>